package Day29;

public class Inner02 {
    public static void main(String[] args) {
        Work w1 = new Work();
        w1.alarm(new Bell(){
            @Override
            public void ring() {
                System.out.println("qichuanl");
            }
        });
        w1.alarm(new Bell(){
            @Override
            public void ring() {
                System.out.println("jjjjjjj");
            }
        });

        Bell tiger = new Bell(){
            @Override
            public void ring() {
                System.out.println("hhhhh");
            }
        };

    }

    interface Bell {
        void ring();
    }
    static class Work{
        public Work() {
        }
        public void alarm(Bell bell){
            bell.ring();
        }
    }


}